package com.cy.controller;

import com.cy.service.RemoteProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:  演示基于feign方式的服务调用
 * @author: LiuXingYu
 * @date: 2021/7/30 21:42
 */
@RestController
public class FeignConsumerController {

    @Autowired
    private RemoteProviderService remoteProviderService;

    @GetMapping("/feign/echo/{msg}")
    public String doFeignEcho(@PathVariable String msg){
        return remoteProviderService.echoMsg(msg);
    }

}
